package com.lcw.lostandfound.mapper;

import com.lcw.lostandfound.pojo.User;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface UserMapper {

    List<User> findAllUsers();
    int addUser(User user);
    User findByName(String username);
    int deleteByName(String username);
    @Delete({"delete from t_user where id =#{id}"})
    int deleteById(Integer id);
    int updateUser(User user);
    User doLogin(String username,String password);
    User checkTel(String tel);
}
